﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class UserControls_ReturnGoodDetail : UCBase
{
    public UserControls_ReturnGoodDetail()
    {
        Name = "退货单的商品信息";
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (_Customer == null)
        {
            Response.Redirect("Default.aspx?PN=Login");
        }
        else
        {
            LoadData();
        }
    }

    /// <summary>
    /// 加载某一退货单的商品信息
    /// </summary>
    private void LoadData()
    {
        //DataTable dt = BLL.BackGoodDetailBLL.GetBackGoodDetail("ID="+Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("ID"),0)+"");
        //if (dt != null && dt.Rows.Count > 0)//加载退货理由和拒绝退货理由
        //{
        //    if (dt.Rows[0]["ReturnSeason"].ToString() != "") 
        //    {
        //        lbReturnSeason.Text = dt.Rows[0]["ReturnSeason"].ToString();
        //    }
        //    if (dt.Rows[0]["DeclineSeason"].ToString() != "")
        //    {
        //        lbDeclineReason.Text = dt.Rows[0]["DeclineSeason"].ToString();
        //    }
        //}
        //gvGood.DataSource = dt;
        //gvGood.DataBind();
    }

    protected void gvGood_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        // 设置表格样式
        e.Row.Attributes.Add("class", "black12");//字体
        if (e.Row.RowType == DataControlRowType.Header)
        {
            e.Row.Style.Add("background-image", "url(images/bg_hui_23_2.jpg)");//为列头添加前景图
        }
        if (e.Row.RowType == DataControlRowType.DataRow)//为行添加背景色
        {
            e.Row.BackColor = System.Drawing.Color.FromName("#FFFFFF");
        }
    }
}
